//**************************************************
// 本文件为cmd显示文件，构建LCD结构体，其中包含13*50的数
// 组，每个单元格占13*5个位置，支持10个单元格
//**************************************************

#if !defined(LCD_H)
#define LCD_H
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <Windows.h>
using namespace std;

struct LCD
{
    LCD() { vClear(); }
    unsigned int mask[8][32] = {

        {0x00, 0x00, 0xFC, 0x7F, 0x04, 0x00, 0xE4, 0x1F, 0x24, 0x10, 0xE4, 0x1F, 0x24, 0x10, 0xE4, 0x1F, 0x04, 0x00, 0xE4, 0x1F, 0x04, 0x08, 0x04, 0x04, 0xF4, 0x7F, 0x02, 0x02, 0x82, 0x02, 0x01, 0x01}, /*"厚",0*/
        {0x08, 0x02, 0x08, 0x02, 0xF4, 0x7F, 0x02, 0x02, 0xE9, 0x3F, 0x28, 0x25, 0x24, 0x25, 0xE6, 0x3F, 0x05, 0x00, 0xF4, 0x7F, 0x04, 0x02, 0x04, 0x24, 0xA4, 0x44, 0xA4, 0x50, 0x94, 0x10, 0x04, 0x1F}, /*"德",1*/
        {0x10, 0x04, 0x10, 0x14, 0xFE, 0x24, 0x10, 0x04, 0xFF, 0x7F, 0x08, 0x04, 0x08, 0x24, 0xFF, 0x24, 0x04, 0x24, 0x12, 0x14, 0xFE, 0x14, 0x10, 0x08, 0xF0, 0x48, 0x1F, 0x54, 0x10, 0x62, 0x10, 0x41}, /*"载",2*/
        {0x08, 0x01, 0x08, 0x01, 0x0A, 0x01, 0x0A, 0x3F, 0xBE, 0x2A, 0x4A, 0x2A, 0x09, 0x2A, 0x08, 0x29, 0x38, 0x29, 0x8F, 0x24, 0x4A, 0x24, 0x08, 0x22, 0x08, 0x22, 0x08, 0x21, 0x88, 0x14, 0x08, 0x08}, /*"物",3*/
        {0x80, 0x00, 0x40, 0x00, 0x20, 0x00, 0xF8, 0x0F, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xF8, 0x0F, 0x08, 0x08, 0x08, 0x08, 0xF8, 0x0F, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0xF8, 0x0F, 0x08, 0x08}, /*"自",4*/
        {0x00, 0x00, 0x9F, 0x3F, 0x90, 0x20, 0x90, 0x20, 0x90, 0x3F, 0x1E, 0x04, 0x02, 0x04, 0xC2, 0x7F, 0x42, 0x44, 0x5E, 0x44, 0xD0, 0x7F, 0x10, 0x04, 0x10, 0x24, 0x10, 0x44, 0xEA, 0x7F, 0x04, 0x40}, /*"强",5*/
        {0x00, 0x00, 0xFE, 0x3F, 0x00, 0x01, 0x00, 0x01, 0x80, 0x00, 0x80, 0x00, 0xC0, 0x02, 0xA0, 0x04, 0x90, 0x08, 0x88, 0x10, 0x84, 0x20, 0x82, 0x20, 0x81, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00}, /*"不",6*/
        {0x80, 0x00, 0x40, 0x00, 0xF8, 0x0F, 0x08, 0x08, 0xF8, 0x0F, 0x08, 0x08, 0xF8, 0x0F, 0x08, 0x08, 0xF8, 0x0F, 0x08, 0x08, 0x80, 0x00, 0x10, 0x21, 0x12, 0x49, 0x12, 0x48, 0xE1, 0x0F, 0x00, 0x00}, /*"息",7*/

    };
    unsigned int afterMask[9][32] = {{0x00, 0x00, 0x04, 0x00, 0x88, 0x1F, 0x08, 0x10, 0x00, 0x10, 0x00, 0x10, 0x0F, 0x10, 0x88, 0x1F, 0x88, 0x10, 0x88, 0x00, 0x88, 0x00, 0x88, 0x00, 0xA8, 0x40, 0x98, 0x40, 0x08, 0x7F, 0x00, 0x00}, /*"记",0*/
                                     {0x00, 0x10, 0x00, 0x10, 0x3E, 0x10, 0x22, 0x10, 0xA2, 0x7F, 0x22, 0x10, 0x22, 0x10, 0x3E, 0x10, 0x22, 0x11, 0x22, 0x12, 0x22, 0x12, 0x22, 0x10, 0x3E, 0x10, 0x22, 0x10, 0x00, 0x14, 0x00, 0x08}, /*"时",1*/
                                     {0x08, 0x04, 0x08, 0x04, 0x04, 0x04, 0xE4, 0x7F, 0x22, 0x04, 0x1F, 0x04, 0x88, 0x3F, 0x04, 0x00, 0x02, 0x00, 0xBF, 0x3F, 0x82, 0x20, 0x80, 0x20, 0xB8, 0x20, 0x87, 0x20, 0x82, 0x3F, 0x80, 0x20}, /*"结",2*/
                                     {0x80, 0x00, 0x80, 0x00, 0xFF, 0x7F, 0x80, 0x00, 0x80, 0x00, 0xFC, 0x1F, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0xFC, 0x1F, 0xC4, 0x11, 0xA0, 0x02, 0x90, 0x04, 0x8C, 0x18, 0x83, 0x60, 0x80, 0x00}, /*"束",3*/
                                     {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00}, /*"，",4*/
                                     {0x00, 0x08, 0x00, 0x1F, 0xFC, 0x00, 0x80, 0x00, 0xFF, 0x7F, 0x80, 0x00, 0xF8, 0x0F, 0x88, 0x08, 0xF8, 0x0F, 0x88, 0x08, 0xF8, 0x0F, 0x80, 0x00, 0xFC, 0x1F, 0x80, 0x00, 0xFF, 0x7F, 0x00, 0x00}, /*"重",5*/
                                     {0x08, 0x00, 0x10, 0x20, 0xFE, 0x1E, 0x00, 0x02, 0x44, 0x02, 0x28, 0x02, 0xFF, 0x7E, 0x10, 0x12, 0x10, 0x12, 0xFE, 0x12, 0x10, 0x12, 0x54, 0x12, 0x92, 0x12, 0x11, 0x11, 0x14, 0x11, 0x88, 0x10}, /*"新",6*/
                                     {0x04, 0x02, 0x04, 0x05, 0x84, 0x08, 0x5F, 0x10, 0xA4, 0x6F, 0x02, 0x00, 0xCA, 0x23, 0x49, 0x2A, 0x5F, 0x2A, 0xC8, 0x2B, 0x58, 0x2A, 0x4F, 0x2A, 0xCA, 0x2B, 0x48, 0x22, 0x48, 0x2A, 0x48, 0x13}, /*"输",7*/
                                     {0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x20, 0x02, 0x20, 0x02, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x04, 0x08, 0x02, 0x10, 0x01, 0x60},
                                     /*"入",8*/};

    unsigned int afterMask2[6][32] = {{0x04, 0x02, 0x04, 0x05, 0x84, 0x08, 0x5F, 0x10, 0xA4, 0x6F, 0x02, 0x00, 0xCA, 0x23, 0x49, 0x2A, 0x5F, 0x2A, 0xC8, 0x2B, 0x58, 0x2A, 0x4F, 0x2A, 0xCA, 0x2B, 0x48, 0x22, 0x48, 0x2A, 0x48, 0x13}, /*"输",0*/
                                      {0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x20, 0x02, 0x20, 0x02, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x04, 0x08, 0x02, 0x10, 0x01, 0x60}, /*"入",1*/
                                      {0x20, 0x00, 0x20, 0x00, 0xF0, 0x07, 0x08, 0x04, 0x04, 0x02, 0xFA, 0x0F, 0x08, 0x08, 0x88, 0x08, 0x88, 0x08, 0x88, 0x08, 0x88, 0x08, 0x48, 0x08, 0x40, 0x03, 0x20, 0x04, 0x18, 0x08, 0x06, 0x10}, /*"负",2*/
                                      {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"一",3*/
                                      {0xC0, 0x1F, 0x44, 0x10, 0x48, 0x10, 0xC8, 0x1F, 0x40, 0x10, 0x40, 0x10, 0xCF, 0x1F, 0x48, 0x22, 0x48, 0x14, 0x48, 0x08, 0x48, 0x11, 0xC8, 0x20, 0x48, 0x20, 0x14, 0x00, 0xE2, 0x7F, 0x00, 0x00}, /*"退",4*/
                                      {0x80, 0x00, 0x80, 0x00, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0x84, 0x10, 0xFC, 0x1F, 0x80, 0x10, 0x80, 0x00, 0x80, 0x00, 0x82, 0x20, 0x82, 0x20, 0x82, 0x20, 0x82, 0x20, 0xFE, 0x3F, 0x00, 0x20},
                                      /*"出",5*/};
    unsigned int inputMask[6][32] = {
        {0x00, 0x02, 0x02, 0x02, 0xE4, 0x3F, 0x04, 0x02, 0xC0, 0x1F, 0x00, 0x02, 0xE7, 0x7F, 0x04, 0x00, 0xC4, 0x1F, 0x44, 0x10, 0xC4, 0x1F, 0x44, 0x10, 0xD4, 0x1F, 0x4C, 0x10, 0x44, 0x14, 0x40, 0x08}, /*"请",0*/
        {0x04, 0x02, 0x04, 0x05, 0x84, 0x08, 0x5F, 0x10, 0xA4, 0x6F, 0x02, 0x00, 0xCA, 0x23, 0x49, 0x2A, 0x5F, 0x2A, 0xC8, 0x2B, 0x58, 0x2A, 0x4F, 0x2A, 0xCA, 0x2B, 0x48, 0x22, 0x48, 0x2A, 0x48, 0x13}, /*"输",1*/
        {0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x20, 0x02, 0x20, 0x02, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x04, 0x08, 0x02, 0x10, 0x01, 0x60}, /*"入",2*/
        {0x00, 0x10, 0x00, 0x10, 0x3E, 0x10, 0x22, 0x10, 0xA2, 0x7F, 0x22, 0x10, 0x22, 0x10, 0x3E, 0x10, 0x22, 0x11, 0x22, 0x12, 0x22, 0x12, 0x22, 0x10, 0x3E, 0x10, 0x22, 0x10, 0x00, 0x14, 0x00, 0x08}, /*"时",3*/
        {0x10, 0x00, 0x10, 0x08, 0x10, 0x04, 0x10, 0x02, 0x10, 0x01, 0x90, 0x00, 0x10, 0x00, 0xFF, 0x7F, 0x50, 0x00, 0x90, 0x00, 0x10, 0x01, 0x10, 0x02, 0x90, 0x04, 0x50, 0x18, 0x30, 0x60, 0x10, 0x00}, /*"长",4*/
        {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00}, /*"：",5*/
    };
    unsigned int errorMask[9][32] = {
        {0x04, 0x02, 0x04, 0x05, 0x84, 0x08, 0x5F, 0x10, 0xA4, 0x6F, 0x02, 0x00, 0xCA, 0x23, 0x49, 0x2A, 0x5F, 0x2A, 0xC8, 0x2B, 0x58, 0x2A, 0x4F, 0x2A, 0xCA, 0x2B, 0x48, 0x22, 0x48, 0x2A, 0x48, 0x13}, /*"输",0*/
        {0x20, 0x00, 0x40, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x20, 0x02, 0x20, 0x02, 0x10, 0x04, 0x10, 0x04, 0x08, 0x08, 0x04, 0x08, 0x02, 0x10, 0x01, 0x60}, /*"入",1*/
        {0x40, 0x00, 0x40, 0x00, 0xFF, 0x7F, 0x20, 0x00, 0x20, 0x00, 0xF0, 0x0F, 0x10, 0x08, 0x18, 0x08, 0xF4, 0x0F, 0x12, 0x08, 0x11, 0x08, 0xF0, 0x0F, 0x10, 0x08, 0x10, 0x08, 0x10, 0x0A, 0x10, 0x04}, /*"有",2*/
        {0x00, 0x00, 0xC2, 0x1F, 0x44, 0x10, 0x44, 0x10, 0xC0, 0x1F, 0x00, 0x00, 0x07, 0x00, 0xE4, 0x3F, 0x04, 0x02, 0x04, 0x02, 0xF4, 0x7F, 0x04, 0x02, 0x14, 0x05, 0x8C, 0x08, 0x44, 0x10, 0x30, 0x60}, /*"误",3*/
        {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00}, /*"，",4*/
        {0x00, 0x08, 0x00, 0x1F, 0xFC, 0x00, 0x80, 0x00, 0xFF, 0x7F, 0x80, 0x00, 0xF8, 0x0F, 0x88, 0x08, 0xF8, 0x0F, 0x88, 0x08, 0xF8, 0x0F, 0x80, 0x00, 0xFC, 0x1F, 0x80, 0x00, 0xFF, 0x7F, 0x00, 0x00}, /*"重",5*/
        {0x08, 0x00, 0x10, 0x20, 0xFE, 0x1E, 0x00, 0x02, 0x44, 0x02, 0x28, 0x02, 0xFF, 0x7E, 0x10, 0x12, 0x10, 0x12, 0xFE, 0x12, 0x10, 0x12, 0x54, 0x12, 0x92, 0x12, 0x11, 0x11, 0x14, 0x11, 0x88, 0x10}, /*"新",6*/
        {0x00, 0x00, 0xFE, 0x3F, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0xFF, 0x7F, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x08, 0x04, 0x08, 0x04, 0x04, 0x04, 0x02, 0x04}, /*"开",7*/
        {0x08, 0x04, 0x08, 0x04, 0x08, 0x04, 0x08, 0x02, 0x3F, 0x12, 0x24, 0x21, 0xA4, 0x7F, 0x24, 0x41, 0x24, 0x00, 0x12, 0x3F, 0x14, 0x21, 0x08, 0x21, 0x14, 0x21, 0x22, 0x21, 0x01, 0x3F, 0x00, 0x21}, /*"始",8*/
    };
    char data[13][50];
    /**
     * @description: 初始化data数组为空格
     * @param {*}
     * @return {*}
     */
    void vClear()
    {
        memset(data, '-', sizeof(data));
    }
    /**
     * @description: 此函数用于输出LCD屏，通过输出控制字符调节显示颜色来增加可见性
     * @param {*}
     * @return {*}
     */
    void vPrintAll()
    {
        for (int i = 0; i < 13; ++i)
        {

            for (int j = 0; j < 10; ++j)
            {
                string cmd = "\033[30m ";
                cmd[3] += (j % 4);
                // cout <<cmd;
                cout << cmd;
                for (int k = 0; k < 5; ++k)
                    cout << data[i][5 * j + k];
                cout << "\033[0m";
            }
            cout << endl;
        }
    }
    /**
     * @description:  显示前n位数字
     * @param {int} n
     * @return {*}
     */
    void vPrintN(int n)
    {
        for (int i = 0; i < 13; ++i)
        {

            for (int j = 0; j < n; ++j)
            {
                string cmd = "\033[31m ";
                cmd[3] += (j % 4);
                // cout <<cmd;
                cout << cmd;
                for (int k = 0; k < 5; ++k)
                    cout << data[i][5 * j + k];
                cout << "\033[0m";
            }

            cout << endl;
        }
    }
    /**
     * @description: 汉字显示底层函数，用字模来显示汉字 ，字模软件PCtoLCD2002
     * @param {unsigned int } mask 字模，软件生成的像素点每八个为一个数据，逐次取模输出即可显示出一行的数据，由于汉字大小设置为16*16（太小没办法显示），所以需要执行两次这个函数
     * @return {*}
     */
    void vDispFromMask(unsigned int mask)
    {
        int i = 0;
        while (i != 8)
        {
            if (mask % 2 == 0)
            {
                cout << ' ';
            }
            else
            {
                cout << '*';
            }
            mask = mask / 2;
            i++;
        }
    }
    /**
     * @description: 调用底层函数，显示校庆贺词  
     * @param {*}
     * @return {*}
     */
    void vDisp()
    {
        for (int i = 0; i < 16; ++i)
        {

            for (int j = 0; j < 8; ++j)
            {
                string cmd = "\033[31m ";
                cmd[3] += (j % 4);
                cout << cmd;
                vDispFromMask(mask[j][2 * i]);
                vDispFromMask(mask[j][2 * i + 1]);
                cout << "\033[0m";
            }
            cout << endl;
        }
    }
    void vErrorMask()
    {
        for (int i = 0; i < 16; ++i)
        {
            for (int j = 0; j < 9; ++j)
            {
                vDispFromMask(errorMask[j][2 * i]);
                vDispFromMask(errorMask[j][2 * i + 1]);
            }
            cout << endl;
        }
    }
    /**
     * @description: 错误处理函数，显示提示语，清屏并重新输入。
     * @param {*}
     * @return {*}
     */
    void ErrorHandle()
    {
        system("cls");
        vErrorMask();
        Sleep(1000);
        system("cls");
    }
    /**
     * @description:  后面三个函数都是汉字输出显示的函数
     * @param {*}
     * @return {*}
     */
    void vInputMask()
    {
        for (int i = 0; i < 16; ++i)
        {
            for (int j = 0; j < 6; ++j)
            {
                vDispFromMask(inputMask[j][2 * i]);
                vDispFromMask(inputMask[j][2 * i + 1]);
            }
            cout << endl;
        }
    }
    void vAfterInputMask()
    {
        for (int i = 0; i < 16; ++i)
        {
            for (int j = 0; j < 9; ++j)
            {
                vDispFromMask(afterMask[j][2 * i]);
                vDispFromMask(afterMask[j][2 * i + 1]);
            }
            cout << endl;
        }
    }
    void vAfterInputMask2()
    {
        for (int i = 0; i < 16; ++i)
        {
            for (int j = 0; j < 6; ++j)
            {
                vDispFromMask(afterMask2[j][2 * i]);
                vDispFromMask(afterMask2[j][2 * i + 1]);
            }
            cout << endl;
        }
    }
    /**
     * @description: 此函数配置data数组为可输出状态，目前支持数字
     * @param {int} n 第几块单元格
     * @param {int} num 输入的数字
     * @return {*}
     */
    void vSet(int n, int num)
    {
        switch (num)
        {
        case 0:
            vLine(0, n);
            vVoidLine(1, n);
            vDotDouble(2, n);
            vVoidLine(3, n);
            vDotDouble(4, n);
            vVoidLine(5, n);
            vDotDouble(6, n);
            vVoidLine(7, n);
            vDotDouble(8, n);
            vVoidLine(9, n);
            vDotDouble(10, n);
            vVoidLine(11, n);
            vLine(12, n);
            break;
        case 1:
            vDotRight(0, n);
            vVoidLine(1, n);
            vDotRight(2, n);
            vVoidLine(3, n);
            vDotRight(4, n);
            vVoidLine(5, n);
            vDotRight(6, n);
            vVoidLine(7, n);
            vDotRight(8, n);
            vVoidLine(9, n);
            vDotRight(10, n);
            vVoidLine(11, n);
            vDotRight(12, n);
            break;
        case 2:

            vLine(0, n);
            vVoidLine(1, n);
            vDotRight(2, n);
            vVoidLine(3, n);
            vDotRight(4, n);
            vVoidLine(5, n);
            vLine(6, n);
            vVoidLine(7, n);
            vDotLeft(8, n);
            vVoidLine(9, n);
            vDotLeft(10, n);
            vVoidLine(11, n);
            vLine(12, n);
            break;
        case 3:
            vLine(0, n);
            vVoidLine(1, n);
            vDotRight(2, n);
            vVoidLine(3, n);
            vDotRight(4, n);
            vVoidLine(5, n);
            vLine(6, n);
            vVoidLine(7, n);
            vDotRight(8, n);
            vVoidLine(9, n);
            vDotRight(10, n);
            vVoidLine(11, n);
            vLine(12, n);
            break;
        case 4:
            vDotDouble(0, n);
            vVoidLine(1, n);
            vDotDouble(2, n);
            vVoidLine(3, n);
            vDotDouble(4, n);
            vVoidLine(5, n);
            vLine(6, n);
            vVoidLine(7, n);
            vDotRight(8, n);
            vVoidLine(9, n);
            vDotRight(10, n);
            vVoidLine(11, n);
            vDotRight(12, n);
            break;
        case 5:
            vLine(0, n);
            vVoidLine(1, n);
            vDotLeft(2, n);
            vVoidLine(3, n);
            vDotLeft(4, n);
            vVoidLine(5, n);
            vLine(6, n);
            vVoidLine(7, n);
            vDotRight(8, n);
            vVoidLine(9, n);
            vDotRight(10, n);
            vVoidLine(11, n);
            vLine(12, n);
            break;
        case 6:
            vLine(0, n);
            vVoidLine(1, n);
            vDotLeft(2, n);
            vVoidLine(3, n);
            vDotLeft(4, n);
            vVoidLine(5, n);
            vLine(6, n);
            vVoidLine(7, n);
            vDotDouble(8, n);
            vVoidLine(9, n);
            vDotDouble(10, n);
            vVoidLine(11, n);
            vLine(12, n);
            break;
        case 7:
            vLine(0, n);
            vVoidLine(1, n);
            vDotRight(2, n);
            vVoidLine(3, n);
            vDotRight(4, n);
            vVoidLine(5, n);
            vDotRight(6, n);
            vVoidLine(7, n);
            vDotRight(8, n);
            vVoidLine(9, n);
            vDotRight(10, n);
            vVoidLine(11, n);
            vDotRight(12, n);
            break;
        case 8:
            vLine(0, n);
            vVoidLine(1, n);
            vDotDouble(2, n);
            vVoidLine(3, n);
            vDotDouble(4, n);
            vVoidLine(5, n);
            vLine(6, n);
            vVoidLine(7, n);
            vDotDouble(8, n);
            vVoidLine(9, n);
            vDotDouble(10, n);
            vVoidLine(11, n);
            vLine(12, n);
            break;
        case 9:
            vLine(0, n);
            vVoidLine(1, n);
            vDotDouble(2, n);
            vVoidLine(3, n);
            vDotDouble(4, n);
            vVoidLine(5, n);
            vLine(6, n);
            vVoidLine(7, n);
            vDotRight(8, n);
            vVoidLine(9, n);
            vDotRight(10, n);
            vVoidLine(11, n);
            vLine(12, n);
            break;
        case -1:
            for (int i = 0; i < 13; ++i)
            {
                vNone(i, n);
            }
        default:
            break;
        }
    }
    /**
     * @description: 描述了画图所需要的基本元素比如线、点等，y表示row，x表示cols
     * @param {int} y
     * @param {int} x
     * @return {*}
     */
    void vNone(int y, int x) // 空
    {
        if (x > 10 || x < 0)
        {
            cerr << "x out of range " << endl;
            return;
        }
        if (y > 13 || y < 0)
        {
            cerr << "y out of range " << endl;
            return;
        }
        data[y][5 * x] = ' ';
        data[y][5 * x + 1] = ' ';
        data[y][5 * x + 2] = ' ';
        data[y][5 * x + 3] = ' ';
        data[y][5 * x + 4] = ' ';
    }
    void vLine(int y, int x) // |**** |
    {
        if (x > 10 || x < 0)
        {
            cerr << "x out of range " << endl;
            return;
        }
        if (y > 13 || y < 0)
        {
            cerr << "y out of range " << endl;
            return;
        }
        data[y][5 * x] = '*';
        data[y][5 * x + 1] = '*';
        data[y][5 * x + 2] = '*';
        data[y][5 * x + 3] = '*';
        data[y][5 * x + 4] = ' ';
    }
    void vDotLeft(int y, int x) // |    *|
    {
        if (x > 10 || x < 0)
        {
            cerr << "x out of range " << endl;
            return;
        }
        if (y > 13 || y < 0)
        {
            cerr << "y out of range " << endl;
            return;
        }
        data[y][5 * x] = '*';
        data[y][5 * x + 1] = ' ';
        data[y][5 * x + 2] = ' ';
        data[y][5 * x + 3] = ' ';
        data[y][5 * x + 4] = ' ';
    }
    void vDotRight(int y, int x) // |*    |
    {
        if (x > 10 || x < 0)
        {
            cerr << "x out of range " << endl;
            return;
        }
        if (y > 13 || y < 0)
        {
            cerr << "y out of range " << endl;
            return;
        }
        data[y][5 * x] = ' ';
        data[y][5 * x + 1] = ' ';
        data[y][5 * x + 2] = ' ';
        data[y][5 * x + 3] = '*';
        data[y][5 * x + 4] = ' ';
    }
    void vVoidLine(int y, int x) // |    |
    {
        if (x > 10 || x < 0)
        {
            cerr << "x out of range " << endl;
            return;
        }
        if (y > 13 || y < 0)
        {
            cerr << "y out of range " << endl;
            return;
        }
        data[y][5 * x] = ' ';
        data[y][5 * x + 1] = ' ';
        data[y][5 * x + 2] = ' ';
        data[y][5 * x + 3] = ' ';
        data[y][5 * x + 4] = ' ';
    }
    void vDotDouble(int y, int x) // |*   *|
    {
        if (x > 10 || x < 0)
        {
            cerr << "x out of range " << endl;
            return;
        }
        if (y > 13 || y < 0)
        {
            cerr << "y out of range " << endl;
            return;
        }
        data[y][5 * x] = '*';
        data[y][5 * x + 1] = ' ';
        data[y][5 * x + 2] = ' ';
        data[y][5 * x + 3] = '*';
        data[y][5 * x + 4] = ' ';
    }
};

#endif // LCD_H
